# this file used to display colored sequences on linux shell
# not used in windows

def colorseq(seq):
	new = []
	for i in seq:
		if i == 'A':
			new.append( "%s[31;1m%s%s[0m" % (chr(27), i, chr(27)))
		elif i == 'T':
			new.append( "%s[32;1m%s%s[0m" % (chr(27), i, chr(27)))
		elif i == 'G':
			new.append( "%s[33;1m%s%s[0m" % (chr(27), i, chr(27)))
		elif i == 'C':
			new.append( "%s[34;1m%s%s[0m" % (chr(27), i, chr(27)))
		else:
			new.append(i)
	return  ''.join(new)

if __name__ == '__main__': 
	import sys
	if len(sys.argv) == 1:
		print "python colorseq.py seq file"
		print "This will print colored sequences"
	else:
		print colorseq(sys.argv[1])
